<!doctype html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <block name="title"><title>{$meta_title}｜{:C('WEB_SITE_TITLE')}－{:C('WEB_SITE_SLOGAN')}</title></block>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta name="author" content="{:C('WEB_SITE_TITLE')}">
    <meta name="keywords" content="{$meta_keywords}">
    <meta name="description" content="{$meta_description}">
    <meta name="generator" content="零云">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-title" content="{:C('WEB_SITE_TITLE')}">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <link rel="shortcut icon" type="image/x-icon" href="__ROOT__/favicon.ico">
    <link rel="apple-touch-icon" type="image/x-icon" href="__ROOT__/logo.png">
    <link rel="stylesheet" type="text/css" href="__LYUI__/css/lyui.min.css">
    <link rel="stylesheet" type="text/css" href="__HOME_CSS__/home.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/libs/animate/animate.min.css">
    <block name="style"></block>
    <!--[if lt IE 9]>
        <script src="//cdn.bootcss.com/html5shiv/r29/html5.min.js"></script>
        <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script type="text/javascript" src="//cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <script type="text/javascript">
        window.jQuery || document.write('<script type="text/javascript" src="__PUBLIC__/libs/jquery/1.x/jquery.min.js"><\/script>');
        window.lingyun = {
            "app_debug"     : "<?php echo C('app_debug'); ?>",
            "app_debug_msg" : "调试模式已关闭",
            "top_home_page" : "{:C('TOP_HOME_PAGE')}",
            "home_page"     : "{:C('HOME_PAGE')}",
            "var_root "     : "__ROOT__",
            "default_img"   : "{:get_cover('', 'default')}"
        }
    </script>
</head>
<body class="{$_page_name}">
    <div name="full_wrap">
        <block name="hook_page_header">
            <div class="clearfix hook hook-page-header">
                {:hook('PageHeader')} <!-- 文档开始钩子 -->
            </div>
        </block>

        <block name="wrap">
            <div class="clearfix full-wrap">
                <div class="clearfix full-header">
                    <block name="header">
                        <block name="top-nav">
                            <nav class="navbar navbar-default navbar-mini top-nav hidden-xs hidden-sm" role="navigation">
                                <div class="container">
                                    <div class="collapse navbar-collapse">
                                        <ul class="nav navbar-nav" style="margin-left:-15px">
                                            <li>
                                                <a target="_blank" href="#">
                                                    <span>您好，</span>
                                                    <span>欢迎来到 {:C('WEB_SITE_TITLE')}，{:C('WEB_SITE_SLOGAN')}！</span>
                                                </a>
                                            </li>
                                        </ul>
                                        <ul class="nav navbar-nav navbar-right">
                                            <li>
                                                <a target="blank" href="{:U('Wallet/Recharge/index', '', true, true)}">
                                                    <span class="text-primary">¥</span>
                                                    <span>充值</span>
                                                </a>
                                            </li>
                                            <!-- 用户相关-->
                                            <present name="_user_auth">
                                                <li>
                                                    <a href="{:U('User/Message/index', '', true, true)}">
                                                        <span class="fa fa-envelope-o"></span> 消息
                                                        (<span>{$_new_message|default=0}</span>) <!-- 新消息数量 -->
                                                    </a>
                                                </li>
                                                <li class="dropdown">
                                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                                        <img class="nav-img img-circle" src="{$_user_auth.avatar|get_cover='avatar'}" alt="{$_user_auth.nickname}">
                                                        <span>{$_user_auth.nickname}</span>
                                                        <span class="fa fa-angle-down"></span>
                                                    </a>
                                                    <ul class="dropdown-menu">
                                                        <!-- <li><a href="{:U('User/Index/index', '', true, true)}" class=""><i class="fa fa-tachometer" style="width: 16px;text-align: center;"></i> 个人中心</a></li> -->
                                                        <?php if($_user_nav_main): ?>
                                                            <li role="separator" class="divider"></li>
                                                        <?php endif; ?>
                                                        <volist name="_user_nav_main" id="vo_nav">
                                                            <li><a href="{:U($vo_nav['url'], '', true, true)}" class="{$vo_nav.class|default=''}"><i class="{$vo_nav.icon}" style="width: 16px;text-align: center;"></i> {$vo_nav.title}</a></li>
                                                        </volist>
                                                        <li role="separator" class="divider"></li>
                                                        <li><a href="{:U('User/User/logout', '', true, true)}" class="ajax-get"><i class="fa fa-sign-out" style="width: 16px;text-align: center;"></i> 注销登录</a></li>
                                                    </ul>
                                                </li>
                                            <else />
                                                <li><a data-toggle="modal" href="#login-modal"><i class="fa fa-sign-in"></i> <span>登录/注册</span></a></li>
                                            </present>
                                            <li class="dropdown">
                                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                                    <i class="fa fa-navicon text-primary"></i>
                                                    网站导航
                                                </a>
                                                <ul class="dropdown-menu">
                                                    <li>
                                                        <li><a href="{:C('TOP_HOME_PAGE')}">网站首页</a></li>
                                                        <lingyun:nav_list name="vo" pid="0" group="top">
                                                            <li>
                                                                <a target="{$vo.target}" href="{$vo.href}">
                                                                    <span> {$vo.title}</span>
                                                                </a>
                                                            </li>
                                                        </lingyun:nav_list>
                                                    </li>
                                                </ul>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </nav>
                        </block>

                        <block name="main-nav">
                            <nav class="navbar navbar-inverse main-nav m-a-0" role="navigation">
                                <div class="container">
                                    <div class="navbar-header">
                                        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse-main">
                                            <span class="sr-only">切换导航</span>
                                            <span class="icon-bar"></span>
                                            <span class="icon-bar"></span>
                                            <span class="icon-bar"></span>
                                        </button>
                                        <a class="navbar-brand" href="{: U(request()->module() . '/Index/index')}">
                                            <php>if(C('WEB_SITE_LOGO_INVERSE')):</php>
                                                <img alt="logo" src="<?php echo get_cover(C('WEB_SITE_LOGO')); ?>" style="display: inline-block">
                                            <php>else:</php>
                                                <span>{:C('LOGO_INVERSE')}</span>
                                            <php>endif;</php>
                                            <!-- 模块子logo -->
                                            <?php if($_current_module): ?>
                                                <span style="color: #2699ed;font-size: 24px;margin-left: -6px;">
                                                    <?php echo $_current_module; ?>
                                                </span>
                                            <?php endif; ?>
                                        </a>
                                    </div>
                                    <div class="collapse navbar-collapse navbar-collapse-main">
                                        <ul class="nav navbar-nav navbar-left"></ul>
                                        <ul class="nav navbar-nav navbar-right">
                                            <!-- 主导航 开始 -->
                                            <lingyun:nav_list name="vo" pid="0" group="main">
                                                <php>if(isset($vo['_child'])):</php>
                                                    <li class="dropdown">
                                                        <a href="{$vo.href}" class="dropdown-toggle" data-toggle="dropdown" role="button">
                                                            <span>{$vo.title}</span>
                                                            <span class="fa fa-angle-down"></span>
                                                        </a>
                                                        <ul class="dropdown-menu">
                                                            <volist name="vo._child" id="vo1">
                                                                <li>
                                                                    <a target="{$vo1.target}" href="{$vo1.href}">{$vo1.title}</a>
                                                                </li>
                                                            </volist>
                                                        </ul>
                                                    </li>
                                                <php>else:</php>
                                                    <li class="<?php
                                                            if(rtrim(C('HOME_DOMAIN') . $_SERVER['REQUEST_URI'], '/') == rtrim($vo['href'], '/')) {
                                                                echo 'active';
                                                            }
                                                        ?>">
                                                        <a target="{$vo.target}" href="{$vo.href}">
                                                            <span> {$vo.title}</span>
                                                        </a>
                                                    </li>
                                                <php>endif;</php>
                                            </lingyun:nav_list>
                                            <!-- 主导航 结束 -->
                                        </ul>
                                    </div>
                                </div>
                            </nav>
                        </block>
                    </block>
                </div>

                <div class="clearfix full-container">
                    <block name="jumbotron">
                        <!--
                            <div class="jumbotron jumbotron-primary jumbotron-background main-jumbotron text-center m-b-sm">
                                <h4>简单、高效、卓越 － <span class="small">{:C('WEB_SITE_SLOGAN')}</span></h4>
                            </div>
                        -->
                    </block>

                    <block name="breadcrumb">
                        <!-- 子域名部署支持 -->
                        <?php if($_current_module && $_current_module !== $meta_title): ?>   <!-- 如果是模块首页则不显示面包屑导航 -->
                            <div class="container m-t">
                                <ol class="breadcrumb m-a-0">
                                    <?php if(C('APP_SUB_DOMAIN_DEPLOY') && in_array(request()->module(), C('APP_SUB_DOMAIN_RULES'))): ?>
                                        <li><a href="{:C('HOME_PAGE')}">首页</a></li>
                                        <li class="active">{$meta_title}</li>
                                    <?php else: ?>
                                        <li><a href="{:C('TOP_HOME_PAGE')}">首页</a></li>
                                        <li><a href="{:U('/'.request()->module())}"><?php echo $_current_module; ?></a></li>
                                        <li class="active">{$meta_title}</li>
                                    <?php endif; ?>
                                </ol>
                            </div>
                        <?php endif; ?>
                    </block>

                    <div id="main" class="main">
                        <block name="main">这里是内容</block>
                    </div>
                </div>

                <div class="clearfix full-foooter">
                    <block name="footer">
                        <block name="footer-nav">
                            <div class="footer">
                                <div class="container">
                                    <div class="row">
                                        <div class="col-xs-12 col-sm-6  col-lg-7 footnav-list">
                                            <div class="row">
                                                <!-- 底部导航 开始 -->
                                                <lingyun:nav_list name="vo" pid="0" group="bottom">
                                                    <div class="col-xs-12 col-sm-3">
                                                        <h4>{$vo.title}</h4>
                                                        <ul class="list-unstyled">
                                                            <volist name="vo._child" id="vo1">
                                                                <li>
                                                                    <a target="{$vo1.target}" class="text-muted" href="{$vo1.href}">{$vo1.title}</a>
                                                                </li>
                                                            </volist>
                                                        </ul>
                                                    </div>
                                                </lingyun:nav_list>
                                                <!-- 底部导航 结束 -->
                                            </div>
                                        </div>
                                        <div class="col-xs-12 col-sm-6 col-lg-5 qrcode-list hidden-xs">
                                            <div class="col-xs-6 text-center">
                                                <img src="<?php echo get_cover(C('QR_IOS'), 'qr_ios'); ?>" width="100">
                                                <p>iOS版本</p>
                                            </div>
                                            <div class="col-xs-6 text-center">
                                                <img src="<?php echo get_cover(C('QR_ANDROID'), 'qr_android');?>" width="100">
                                                <p>Android版本</p>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row m-t">
                                        <div class="col-xs-12 m-b-sm">合作伙伴:</div>
                                        <div class="col-xs-12 friend-link">
                                            <!-- 合作伙伴 -->
                                            <linkAddon:link name="lk" type="2">
                                                <div class="m-b-xs item">
                                                    <a target="_blank" href="{$lk.url|default=''}">
                                                        <img src="{$lk.logo|get_cover|default=''}" alt="{$lk.title|default=''}" style="width: 100%;height: 100%;">
                                                    </a>
                                                </div>
                                            </linkAddon:link>
                                        </div>
                                    </div>
                                    <div class="row m-t-sm">
                                        <div class="col-xs-12 m-b-xs">友情链接:</div>
                                        <div class="col-xs-12 friend-link">
                                            <!-- 友情链接 -->
                                            <linkAddon:link name="lk" type="1">
                                                <span class="m-b-xs m-r">
                                                    <a target="_blank" href="{$lk.url|default=''}">
                                                        {$lk.title|default=''}
                                                    </a>
                                                </span>
                                            </linkAddon:link>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </block>
                        <div class="footer-bottom">
                            <div class="container">
                                <ul class="list-inline pull-left">
                                    <li><a class="icp" href="http://www.miibeian.gov.cn/" target="_blank">{:C('WEB_SITE_ICP')}</a></li>
                                    <li><span class="copyright">{:C('WEB_SITE_COPYRIGHT')}</span></li>
                                </ul>
                                <ul class="list-inline pull-right hidden-xs">
                                    <li><a href="mailto:{:C('COMPANY_EMAIL')}" target="_blank"><i class="fa fa-envelope-o" style="color: #fff;"></i> 联系我们</a></li>
                                    <li><span>当前版本：{:C('CURRENT_VERSION')}</span></li>
                                </ul>
                            </div>
                        </div>
                    </block>
                </div>
            </div>
        </block>

        <block name="hook_page_footer">
            <div class="clearfix hook hook-page-footer">
                {:hook('PageFooter')} <!-- 文档末尾钩子 -->
            </div>
        </block>
    </div>

    <block name="full_script">
        <div class="clearfix full-script">
            <div class="container-fluid">
                <include file="$_home_public_modal" /> <!-- 弹窗 -->
                <script type="text/javascript" src="__LYUI__/js/lyui.min.js"></script>
                <script type="text/javascript" src="__HOME_JS__/home.js"></script>
                <script type="text/javascript">
                    $(function() {
                        // 主导航如果没有当前URL完全一致的页面则高亮当前页面所在的模块
                        var $nav_list = $(".main-nav .navbar-right");
                        var $current = $nav_list.find("li.active");
                        if ($current.length == 0) {
                            var url = "<?php echo U('/'.request()->module(), '', true, true); ?>";
                            $('.navbar li a[href="' + url + '"]').closest('li').addClass('active');
                        }
                    });
                </script>
                <block name="script"></block>
                {:C('WEB_SITE_STATISTICS')} <!-- 站点统计代码 -->
            </div>
        </div>
    </block>
</body>
</html>
